<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="UTF-8">
<title>注册界面</title>
<script language="javascript">  
function isValid(form)  
{  
if (form.username.value=="")  
 {  
 alert("用户名不能为空");  
 return false;  
 }  
if (form.pwd.value!=form.repwd.value)  
{  
alert("两次输入的密码不同！");  
return false;  
}  
else  if (form.pwd.value=="")  
{  
alert("用户密码不能为空！");  
return false;  
}  
else return true;  
}  
</script> 
</head>
<body>


  <b>用户注册</b>

  <div id="main">
    <form action="check2.jsp" method="post" onSubmit="return isValid(this);">
<table>
  <ul>
  <li>用&nbsp;户&nbsp;名:
  <input type="text" name="username" 
  placeholder="长度控制在3-20个字符之间" autofocus size="20" title="用户名">
  </li>
  <li>姓&nbsp;名:
  <input type="text" name="name" id="name"
  placeholder="长度控制在3-20个字符之间" autofocus size="20" title="姓名">
  </li>
  <li>密&nbsp;&nbsp;&nbsp;&nbsp;码:
  <input name="pwd" type="text" 
  placeholder="请设定在1-8位之间" size="20" title="密码">
  </li>
  <li>确认密码:
   <input type="text" name="repwd"
   placeholder="请设定一致的密码" size="20" title="确认密码">
  </li>
    <li>学&nbsp;号:
  <input type="text" name="number" autofocus size="20" title="学号">
  </li>
   <li>性&nbsp;别:
  <input type="text" name="sex" autofocus size="20" title="性别">
  </li>
    <li>
    <input type="submit" name="submit" id="submit" value="提交">
    <input type="reset" name="reset" id="reset" value="重置">
    </li>
    
     </ul>
     </table>
     </form>
     </div>

</table>

</body>
</html>